| Conditions | 2 |
| Total Lines | 17 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import { |
||
| 27 | |||
| 28 | @Delete(':id') |
||
| 29 | @ApiOperation({title: 'Delete activity'}) |
||
| 30 | @HttpCode(204) |
||
| 31 | public async index( |
||
| 32 | @Param() deleteActivityDto: DeleteActivityDTO, |
||
| 33 | @LoggedUser() user: User |
||
| 34 | ): Promise<boolean> { |
||
| 35 | try { |
||
| 36 | const {id: activityId} = deleteActivityDto; |
||
| 37 | await this.commandBus.execute( |
||
| 38 | new DeleteActivityCommand(user, activityId) |
||
| 39 | ); |
||
| 40 | |||
| 41 | return true; |
||
| 42 | } catch (e) { |
||
| 43 | throw new BadRequestException(e.message); |
||
| 44 | } |
||
| 47 |